﻿@model Annual_faculty_promotions.Core.Domain.Stage

@using (Html.BeginForm("Edit", "Stage", FormMethod.Post, new { id = "frmEditStage", @class = "form-horizontal" }))
{
       @Html.TextBoxFor(model => model.Id, new { hidden = "hidden" })

    <div class="form-group form-group-sm">
        @Html.LabelFor(model => model.Name, new {@class = "col-sm-3 control-label"})
        <div class="col-sm-9">

            @Html.TextBoxFor(model => model.Name, new {@class = "form-control input-sm"})
            @Html.ValidationMessageFor(m => m.Name, "", new {@class = "text-danger"})
        </div>
    </div>
    
    <div class="form-group form-group-sm">
        @Html.LabelFor(model => model.StageNumber, new { @class = "col-sm-3 control-label" })
        <div class="col-sm-9">
            <div id="stagecomboBox">
            </div>
        </div>
    </div>
    <div class="form-group form-group-sm">
        @Html.LabelFor(model => model.Name, new { @class = "col-sm-3 control-label" })
        <div class="col-sm-9">

            @Html.TextBoxFor(model => model.Name, new { @class = "form-control input-sm" })
            @Html.ValidationMessageFor(m => m.Name, "", new { @class = "text-danger" })
        </div>
    </div>
}

<script src="~/Content/jquery-easyui-1.4.2/jquery.easyui.min.js"></script>
<script src="~/Content/jquery-easyui-1.4.2/easyui-rtl.js"></script>
<script>
    
    $('#collegeeditcomboBox').combobox({
        height: 30,
        url: '@Url.Action("GetlistCollege", "College", new {area = "UserArea"})',
        valueField: 'id',
        textField: 'text',
        onLoadSuccess: function (data) {
            $('#collegeeditcomboBox').combobox('select', '@Model.CollegeId');
            $('#CollegeId').val($('#collegeeditcomboBox').combobox('getValue'));
        },
        onSelect: function (record) {
            $('#CollegeId').val(record.id);
        },
        onShowPanel: function () {
            $('#collegeeditcomboBox').combobox('reload');
        }
    });
</script>



